import i18n from 'i18next'

import { initReactI18next } from 'react-i18next'

//创建实例
const instance =i18n.createInstance()
 // 语言包资源
const resources = {
    en:{
        translation:{
            'threeD':'Enter the 3D exhibition',
            'changeTheme':'Switch themes',
            'changeAction':"Switching actions",
            "bullet":'Hurry up and wind up the barrage',
            'release':'publish',
            "open":"Click on me to activate the barrage function",
            "notify":"Call for 'xiaoshuai xiaoshuai', start a new round of dialogue",
            "solve":'Click me to enter customer service chat'
        }
    },
     zh:{
        translation:{
            'threeD':'进入3D展览',
            'changeTheme':'切换主题',
            'changeAction':"切换动作",
            "bullet":'快来发条弹幕吧~',
            'release':'发布',
            "open":"点我,打开弹幕功能!",
            "notify":"呼唤'小帅小帅'，开启新一轮对话",
            'solve':'点我，进入客服聊天'
        }
    }
}
//初始化
instance.use(initReactI18next).init({
    resources,
    lng:localStorage.getItem('lang')||'zh',
    fallback:'zh'
})

export default instance